package edu.java.homework.hw11.join.solution.actors;

import edu.java.homework.hw11.join.solution.dish.Dish;


public class Waiter extends Actor {
	Thread joinThread=null;
	
	
	public Waiter(String name, Dish dish, Thread joinThread) {
		super(name, dish);
		this.joinThread = joinThread;
	}

	public Waiter(String name, Dish dish) {
		super(name, dish);
	}

	@Override
	public void run() {
		// super.run();
		System.out.println(Thread.currentThread().getName() + " starts...");
		
		getDish().serveDish(joinThread);
	}
}
